<!-- 评教 -->
<template>
  <div>
    <el-dialog :title="title" :visible.sync="dialogVisible">
      <el-card class="box-card">
        <div>
          <ul v-for="(item, i) in quotaInfo" :key="i">
            <div class="title">{{ i + 1 }}、{{ item.quotaName }}</div>
            <li v-for="(son, index) in item.options" :key="index">
              <el-radio
                v-model="radio[i]"
                :label="son.optionName"
                :name="son.optionScore + ''"
              ></el-radio>
            </li>
          </ul>
        </div>
        <el-button type="primary">提交</el-button>
      </el-card>
    </el-dialog>
  </div>
</template>
<!-- 评教 -->
<script>
import { getQuotaInfoByDictId } from "../../../api/quota";
export default {
  data() {
    return {
      dictId: 1,
      quotaInfo: [],
      radio: [],
    };
  },
  created() {
    this.getQuotaInfoByDictId();
  },
  methods: {
    // 异步请求指标数据
    async getQuotaInfoByDictId() {
      const { data } = await getQuotaInfoByDictId(this.dictId);
      if (data.code === "2000") {
        this.quotaInfo = data.data;
        this.total = data.data.total;
      } else {
        this.$message({
          message: data.msg,
          type: "error",
        });
      }
    },
  },
};
</script>
<style lang="less" scoped>
.title {
  font-size: 18px;
}
li {
  list-style-type: none;
}
</style>